package homework;

import java.util.ArrayList;
import java.util.Random;

public class homework7 {
    public static void main(String[] args) {
        bigToSmall();
    }
    public static ArrayList<Integer> bigToSmall(){
        ArrayList<Integer> list1=new ArrayList<Integer>();
        ArrayList<Integer> list2=new ArrayList<Integer>();
        Random random=new Random();
       while(list1.size()<20){
           int i=random.nextInt();
           list1.add(i);
       }
        for (Integer i:list1
             ) {
            if(i%2==0){
                list2.add(i);
            }
        }
        for (Integer i:list2
             ) {
            System.out.println(i);
        }
        return list2;
    }
}
